﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;
    using UnityEngineInternal;

    public sealed class Resources
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern UnityEngine.Object[] FindObjectsOfTypeAll(System.Type type);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern UnityEngine.Object GetBuiltinResource(System.Type type, string path);
        public static UnityEngine.Object Load(string path)
        {
            return Load(path, typeof(UnityEngine.Object));
        }

        [MethodImpl(MethodImplOptions.InternalCall), TypeInferenceRule(TypeInferenceRules.TypeReferencedBySecondArgument), WrapperlessIcall]
        public static extern UnityEngine.Object Load(string path, System.Type systemTypeInstance);
        public static UnityEngine.Object[] LoadAll(string path)
        {
            return LoadAll(path, typeof(UnityEngine.Object));
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern UnityEngine.Object[] LoadAll(string path, System.Type systemTypeInstance);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern UnityEngine.Object LoadAssetAtPath(string assetPath, System.Type type);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern void UnloadAsset(UnityEngine.Object assetToUnload);
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public static extern AsyncOperation UnloadUnusedAssets();
    }
}

